import { Column, Entity, Index, PrimaryGeneratedColumn } from "typeorm";

@Index("company_pkey", ["id"], { unique: true })
@Entity("company", { schema: "public" })
export class Company {
  @PrimaryGeneratedColumn({ type: "integer", name: "id" })
  id: number;

  @Column("character varying", {
    name: "name",
    length: 30,
    default: () => "''",
  })
  name: string;

  @Column("integer", { name: "member_id", default: () => "0" })
  memberId: number;

  @Column("integer", { name: "parent_id", default: () => "0" })
  parentId: number;

  @Column("integer", { name: "creator_id", default: () => "0" })
  creatorId: number;

  @Column("character varying", {
    name: "leader",
    length: 10,
    default: () => "''",
  })
  leader: string;

  @Column("character varying", { name: "tel", length: 11, default: () => "''" })
  tel: string;

  @Column("smallint", { name: "status", default: () => "0" })
  status: number;

  @Column("integer", { name: "create_time", default: () => "0" })
  createTime: number;

  @Column("integer", { name: "update_time", default: () => "0" })
  updateTime: number;
}
